package com.example.demo.dao;

import com.example.demo.pojo.Customer;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface CustomerMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Customer record);

    int insertSelective(Customer record);

    Customer selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Customer record);

    int updateByPrimaryKey(Customer record);

    Customer selectByNameAndPassword(@Param("username") String username, @Param("password") String password);
    Customer selectByName(@Param("username")String username);
    int updateByPassword(@Param("username") String username,@Param( "passwordNew")String passwordNew);
    int updateByInformation(@Param("username") String username,@Param("email") String email,@Param("phone") String phone,@Param("question") String question,@Param("answer") String answer);
}